<template>
  <div>
    <!-- body -->
    <div class="body-right">
        <div class="right-header">
            <div class="header-top">
                <div :class="activeClass1 == 'quan'?'active1':''" @click="getActive1('quan')"><p>全部</p></div>
                <div :class="activeClass1 == 'su'?'active1':''" @click="getActive1('su')"><p>待付款</p></div>
                <div :class="activeClass1 == 'hun'?'active1':''" @click="getActive1('hun')"><p>待消费</p></div>
                <div :class="activeClass1 == 'hun'?'active1':''" @click="getActive1('hun')"><p>退款申请</p></div>
            </div>
        </div>
        <div class="con-title">
            <p></p>
        </div>
        <div class="contain">
            <scroll-view class="hot-box">
                <view class="recommend_hot_box">
                    <div class="head">
                        <div class="head-p">
                            <p>餐餐香点餐小程序</p>
                            <p class="time">2020-05-19 08:42 下单</p>
                        </div>
                        <p class="head-p1">已完成</p>
                    </div>
                    <div class="recommend-img">
                        <div>
                            <img src="/static/images/fired-dish/fenzhengrou.jpg" alt="">
                        </div>
                        <div>
                            <img src="/static/images/fired-dish/hongshaoqiezi.jpg" alt="">
                        </div>
                        <div>
                            <img src="/static/images/fired-dish/ganguoxia.jpg" alt="">
                        </div>
                    </div>
                    <div class="footer">
                       <p class="p1">共3件商品，合计: </p>
                       <p class="p2">￥10.73</p>
                    </div>
                    <div class="comment">
                        <div>
                            去评价
                        </div>
                    </div>
                </view>
            </scroll-view>
            <scroll-view class="hot-box">
                <view class="recommend_hot_box">
                    <div class="head">
                        <div class="head-p">
                            <p>餐餐香点餐小程序</p>
                            <p class="time">2020-05-19 08:42 下单</p>
                        </div>
                        <p class="head-p1">退款中</p>
                    </div>
                    <div class="recommend-img">
                        <div>
                            <img src="/static/images/fired-dish/yuqiezi.jpg" alt="">
                        </div>
                        <div>
                            <img src="/static/images/fired-dish/yumipaigu.jpg" alt="">
                        </div>
                    </div>
                    <div class="footer">
                       <p class="p1">共件商品，合计: </p>
                       <p class="p2">￥8.3</p>
                    </div>
                    <div class="comment">
                        <div>
                            去评价
                        </div>
                    </div>
                </view>
            </scroll-view>
        </div>
    </div>
  </div>
</template>

<script>
import { get, post, showModel } from "../../util";
export default {
    data() {
        return {
            activeClass1: 'quan',
            activeClass2: 'zong',
            pages: 0,
            hotList: [
                {
                    src: '/static/images/fired-dish/yuqiezi.jpg',
                    title: '味美汁足鱼香茄子',
                    Nprice: '3.5',
                    Gprice: ''
                }, {
                    src: '/static/images/fired-dish/huanggua.jpg',
                    title: '后厨特制凉拌黄瓜',
                    Nprice: '1.8',
                    Gprice: '2'
                }, {
                    src: '/static/images/fired-dish/yumipaigu.jpg',
                    title: '看着香玉米炖排骨',
                    Nprice: '4.8',
                    Gprice: '5'
                }
            ],
        }
    },
    methods: {
        showDetail () {
            var h = this.hotList
            console.log(h);
            
            var that = this
            wx.navigateTo({
            url: '/pages/detail/main'
            })
        },
        getActive1(val) {
            this.activeClass1 = val
        },
        getActive2(val) {
            this.activeClass2 = val
        },
        //读取当前菜品
        getFreshDish() {
            try {
                var that = this
                wx.request({
                    url: that.baseUrl + '/getDishList/1',
                    method: 'GET',
                    success: function (res) {
                        that.hotList = res.data.dish
                    },
                    fail: function() {
                        //
                    },
                    complete: function() {
                        //
                    }
                })
                
            } catch (e) {
                showModel('请求失败', '请检查网络后再试!')
            }
        },
        getDish() {
            console.log(111);
            
        }
    },
    onLoad() {
        
    },
}
</script>

<style scoped>

.body-right {
    width: 100%;
    background: rgb(247, 242, 242);
    height: 100%;
}
.right-header {
    height: 50px;
    border-bottom: 1px solid rgb(241, 234, 234);
    position: fixed;
    z-index: 999;
    background: #ffffff;
    width: 100%;
    padding-left: 10px;
    top: 0;
}
.header-top {
    display: flex;
}
.header-top div {
    background: rgb(241, 234, 234);
    height: 30px;
    width: 20%;
    margin: 10px 15px 0 0;
    text-align: center;
    border-radius: 20px;
}
.active1 {
    border: 1px solid #ea5149;
}
.header-top div p {
    font-size: 15px;
    color: rgb(102, 97, 97);
    display: inline-block;
    line-height: 30px;
}

.header-btm {
    display: flex;
}
.header-btm div {
    height: 30px;
    width: 70px;
    margin: 10px 15px 0 0;
    text-align: center;
}
.active2 {
    color: red;
    z-index: 999;
}
.header-btm div p {
    font-size: 14px;
    display: inline-block;
    line-height: 30px;
}

.con-body {
    width: 100%;
    height: 100%;
    background: rgb(241, 238, 238);
}
.con-title {
    font-size: 16px;
    margin-left: 15px;
    padding-top: 5px;
    color: rgb(58, 54, 54);
}
.contain {
    width: 94%;
    margin: 60px 3% 150px 3%;
    background: rgb(247, 242, 242);
    border-radius: 10px;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  color: transparent;
}
.hot-box {
    margin-top: 10px;
    background: #ffffff;
    border-radius: 10px;
    height: 210px;
}
.recommend_hot_box {
  height: 100%;
  margin: 15px 0 0 10px;
}

.head {
    display: flex;
    font-size: 16px;
    color: rgb(104, 92, 92);
    margin: 0 10px 10px 10px;
}
.head-p {
    font-size: 20px;
    color: rgb(56, 49, 49);
    letter-spacing: 1px;
    width: 85%;
}
.head-p1 {
    width: 15%;
}
.head-p .time {
    font-size: 15px;
    color: rgb(122, 110, 110);
}


.recommend-img {
    margin-left: 10px;
    display: flex;
}
.recommend-img div {
    width: 90px;
    height: 67px;
    margin-right: 10px;
    border-radius: 5px;
}
.recommend-img div img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.footer {
    display: flex;
    float: right;
    margin-right: 12px;
    margin-top: 10px;
}
.footer .p1 {
    font-size: 16px;
    color: rgb(104, 93, 93);
    margin-top: 4px;
}
.footer .p2 {
    font-size: 20px;
    color: rgb(224, 60, 60);
}

.comment {
    margin-right: 10px;
    margin-top: 38px;
    border-top: 1px solid rgb(212, 200, 200);
}
.comment div {
    width: 60px;
    height: 25px;
    font-size: 16px;
    margin-top: 5px;
    border-radius: 30px;
    color: rgb(224, 60, 60);
    border: 1px solid rgb(224, 60, 60);
    text-align: center;
    line-height: 25px;
    float: right;
}

</style>
